<?php

namespace App\Http\Resources;

use App\Models\BookType;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Str;

class BookHistoryResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => (int)$this->id,
            'user_id' => $this->user_id,
            'module_id' => $this->module_id,
            'book_id' => $this->book_id,
            'chapters_id' => $this->chapters_id,
            'updated_at' => (string)$this->updated_at,
        ];
    }
}
